<?php

function getDB() {
    
    require_once __DIR__ . "/credentials.php";
    
    return new PDO("mysql:dbname=" . $dbname . ";host=" . $host, $user, $password, array(
        PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
    ));
}
